/**
 * Created by Administrator on 2017/5/31 0031.
 */
define([], function () {
    var tpl = {};
    tpl.init = function () {
        var html = '';
        html += thumbnail();
        return html;
    }
    var thumbnail = function () {
        return '<script id="myThumbnail" type="text/html">' +
            '{{each data as value}}' +
            ' <div class="thumbnail border">'+
                '<div class="img">'+
                    '{{if value.picture }}'+
                        '<img src="{{value.picture}}"/>'+
                    '{{else}}'+
                        '<i class="fa fa-picture-o" aria-hidden="true"></i>'+
                    '{{/if}}' +
                '</div>'+
                '<div class="caption">'+
                    '<div class="caption-title">'+
                        '<span>{{value.templateName}}</span>'+
                        ' <span class="badge pull-right" templateId="{{value.id}}">立即使用</span>'+
                    '</div>'+
                    '<div class="caption-content">'+
                        '<span>'+
                            ' <i class="fa fa-tag" aria-hidden="true"></i>'+
                            '引用量：{{value.referenceCount}}'+
                        '</span>'+
                        '<span class="pull-right">'+
                            '<i class="fa fa-eye" aria-hidden="true"></i>'+
                            ' 浏览量：{{value.brownCount}}'+
                        '</span>'+
                    '</div>'+
                '</div>'+
            '</div>'+
            '{{/each}}' +
            '</script>';
    }
    return tpl;
});
